package com.计算平均年龄;

import java.util.Scanner;

public class Solution {

	public Solution() {
		
	}
	public static int count(int W,double Y,double x,int N) {
		for(int i=0;i<N;i++) {
			Y=((Y+1)*(W-W*x)+21*(W*x))/W;
		}
		return N;
		
	}
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        do{
            int W = sc.nextInt();
            double Y = sc.nextDouble();
            double x = sc.nextDouble();
            int N = sc.nextInt();
            System.out.println(count(W,Y,x,N));
        }while(sc.hasNext());
    }
}

